#include<bits/stdc++.h>
using namespace std;
int main(){
	int a, b, c;
	cin>>a>>b>>c;
	for(int i = 1, j = 0, k = 0;i <= c;i++, j = (j+1)%a, k = (k+1)%b){
		cout<<j+1<<" "<<k+1<<endl;
	}
	return 0;
}
